<link type="text/css" rel="stylesheet" href="scripts/tabulous/tabulous.css" />
<script src="scripts/tabulous/tabulous.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#tabs').tabulous({
        	effect: 'scale'
        });
    });
</script>
<link type="text/css" rel="stylesheet" href="scripts/cloudzoom/cloudzoom.css" />
<script src="scripts/cloudzoom/cloudzoom.min.js" type="text/javascript"></script>
<div class="navigation_title">
    <?php
        include 'position.php';
        $sanpham = new sanphambs();
        $sanpham->MaSanPham = $_GET['sid'];
        $ret_sanpham = $sanpham->getList();
        $HinhNho = explode('|', $ret_sanpham[0]["HinhNho"]);
        $HinhTo = explode('|', $ret_sanpham[0]["HinhTo"]);
    ?>
</div>
<div class="navigation_body" style="clear: both; position: relative; padding-top: 10px; overflow: auto;">
    <div style="width: 530px; font-size: 12pt; position: relative;">
        <span style="float: left; width: 220px;">
            <div class="zoom-section" style="clear: both;">    	  
        		<div class="zoom-small-image">
        			<a href='<?php echo DIRBIG.$HinhTo[0]; ?>' class = 'cloud-zoom' id='zoom1' rel="tint:'#C0EECC', tintOpacity:0.5, zoomWidth: 300, adjustX:10, adjustY:-4">
                        <img src="<?php echo DIRSMALL.$HinhNho[0]; ?>" style="border: 1px solid #C2BFBF;" alt='' />
                    </a>
                </div>
                <div class="zoom-desc" style="margin-top: 5px; text-align: center;">
                    <p>       
                    <?php
                        for($i = 0; $i < count($HinhNho); $i++)
                        {
                            if($HinhNho[$i] != "")
                            {
                    ?>
        			<a style="text-decoration: none;" href='<?php echo DIRBIG.$HinhTo[$i]; ?>' class='cloud-zoom-gallery' rel="useZoom: 'zoom1', smallImage: '<?php echo DIRSMALL.$HinhNho[$i]; ?>'">
                        <img class="zoom-tiny-image" width="40px" height="40px" src="<?php echo DIRSMALL.$HinhNho[$i]; ?>" />
                    </a>
                    <?php
                            }
                        }
                    ?>
                    </p>
                </div>
        	</div><!--zoom-section end-->
            <p style="padding-left: 55px; margin-top: 10px;"><a href="index.php?cont=mua_sanpham&sid=<?php echo $ret_sanpham[0]['MaSanPham']; ?>"><img src="images/muahang.png" alt="Mua hàng" /></a></p>
        </span>
        <span style="float: right; width: 260px; padding-left: 50px;">
            <h3 style="color: #0C8794;"><?php echo $ret_sanpham[0]['TenSanPham']; ?></h3>
            <?php
                $donvitinh = new donvitinhbs();
                $donvitinh->MaDonViTinh = $ret_sanpham[0]['MaDonViTinh'];
                $ret_donvitinh = $donvitinh->getList();
            ?>
            <p style="margin: 10px 0 5px 0;">Giá: <b style="color: #FF8000;"><?php echo $ret_sanpham[0]['GiaGoc'].' VND/'.$ret_donvitinh[0]['TenDonViTinh']; ?></b></p>
            <?php
                if($ret_sanpham[0]['GiaKhuyenMai'] != $ret_sanpham[0]['GiaGoc'])
                {
            ?>
                <p style="margin-bottom: 5px;">Giá khuyến mãi: <b style="color: #FF8000;"><?php echo $ret_sanpham[0]['GiaKhuyenMai'].' VND/'.$ret_donvitinh[0]['TenDonViTinh']; ?></b></p>
            <?php
                }
            ?>
            <p style="margin-bottom: 5px;">Quy cách: 
                <b style="color: #FF8000;">
                <?php
                    $quycach = new quycachbs();
                    $quycach->MaQuyCach = $ret_sanpham[0]['MaQuyCach'];
                    $ret_quycach = $quycach->getList();
                    echo $ret_quycach[0]['TenQuyCach'];
                ?>
                </b>
            </p>
            <p style="margin-bottom: 5px;">Xuất xứ:
                <b style="color: #FF8000;"> 
                <?php
                    $xuatxu = new xuatxubs();
                    $xuatxu->MaXuatXu = $ret_sanpham[0]['MaXuatXu'];
                    $ret_xuatxu = $xuatxu->getList();
                    echo "<a href='index.php?cont=searchpro&sid={$ret_xuatxu[0]['MaXuatXu']}'>".$ret_xuatxu[0]['TenXuatXu']."</a>";
                ?>
                </b>
            </p>
            <p>Mô tả: <?php echo html_entity_decode($ret_sanpham[0]['MoTa']); ?></p>
        </span>
    </div>
    <div style="clear: both;"></div>
    
    <!-- Tabs -->
    <div id="tabs" style="margin-top: 10px;">
		<ul>
            <li><a href="#tabs-1">Mô tả</a></li>
            <li><a href="#tabs-2">Chi tiết</a></li>
            <li><a href="#tabs-3">Hướng dẫn</a></li>
        </ul>

		<div id="tabs_container">
            <div id="tabs-1">
                <p><?php echo html_entity_decode($ret_sanpham[0]['MoTa']); ?></p>
            </div>
            <div id="tabs-2">
                <p><?php echo html_entity_decode($ret_sanpham[0]['ChiTiet']); ?></p>
            </div>
            <div id="tabs-3">
                <p>
                    <?php
                        if($ret_sanpham[0]['HuongDan'] != '')
                            echo html_entity_decode($ret_sanpham[0]['HuongDan']);
                        else
                            echo 'Không';
                    ?>
                </p>
            </div>
		</div><!--End tabs container-->
	</div><!--End tabs-->
    
</div>
<div class="navigation_footer" style="clear: both;">
    &nbsp;
</div>